package com.lhn;

import com.lhn.config.SpringConfig;
import com.lhn.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author lhn
 * @date 2024-08-21 16:10
 */

public class App18 {
    public static void main(String[] args) {
        ApplicationContext ctx = new AnnotationConfigApplicationContext(SpringConfig.class);
        BookDao bookDao = ctx.getBean(BookDao.class);
//        bookDao.update();
        /**
         * around before advice ...
         * before advice ...
         * BookDaoImpl.update ...
         * afterReturning advice ...
         * after advice ...
         * around after advice ...
         */

        System.out.println(
                bookDao.select()
        );
        /**
         * around before advice ...
         * BookDaoImpl.select ...
         * around after advice ...
         * 100
         */
    }
}
